import * as types from '../actionTypes'

const initState = {
  sidebarCollapsed: false,
  menuName: ['公告板'],
  currentMenuList: [{ title: '公告板', path: '/' }]
}
export default function app(state = initState, action) {
  switch (action.type) {
    case types.APP_TOGGLE_SIDEBAR:
      return {
        ...state,
        sidebarCollapsed: !state.sidebarCollapsed,
      }
    // case types.SWITCH_MENU:
    //   return {
    //     ...state,
    //     currentMenuList: action.currentMenuList,
    //   }
    default:
      return state
  }
}
